package com.smartfactory.sail.mapper;

import com.smartfactory.sail.entity.Plan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 王巨壁
 * @since 2019-09-05
 */
@Mapper
public interface PlanMapper extends BaseMapper<Plan> {

    List<Plan> selectPlanedOrderItem(@Param("deptId") long deptId);

    List<Plan> selectPlanedAndPreviewOrderItem(@Param("deptId") long deptId);

    List<Plan> selectPlanedAndPreviewOrderItem2(@Param("deptId") long deptId,@Param("days")List<String> days);

    void rePlan(@Param("orderId") long orderId, @Param("itemId") long itemId, @Param("date") String date, @Param("hours") int hours);

    String findMaxDate(@Param("orderId") long orderId, @Param("itemId") long itemId);
}
